package br.com.site.status.bo;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import br.com.site.model.Status;
import br.com.site.status.dao.StatusDAO;

@Service("statusBo")
public class StatusBOImpl implements StatusBO{
	
	@Autowired
	private StatusDAO statusDAO;
	
	public void setStatusDAO(StatusDAO statusDAO) {
		this.statusDAO = statusDAO;
	}

	@Transactional(readOnly = true)
	public List<Status> listarTodos() {
		return statusDAO.listarTodos();
	}

	@Transactional(readOnly = true)
	public Status buscarPorId(Long id) {
		return statusDAO.buscarPorId(id);
	}

	@Transactional
	public Long save(Status status) {
		return statusDAO.save(status);
	}

	@Transactional
	public boolean merge(Status status) {
		return statusDAO.merge(status);
	}

	@Transactional
	public boolean update(Status status) {
		return statusDAO.update(status);
	}

	@Transactional
	public boolean saveOrUpdate(Status status) {
		return statusDAO.saveOrUpdate(status);
	}

	@Transactional
	public boolean delete(Status status) {
		return statusDAO.delete(status);
	}

}
